

<template>
    <rm-layout-top splitcolor="white" :splitwidth=5 :fixsize=35 :canDrag=false>
        <template v-slot:fix>
            <div style="height:35px;border:1px solid #CCC;padding:4px;">
                 <el-row>
                    <el-col :span="14">
                        <div class="grid-content bg-purple"> <span class="remind_class">*仅显示前100条数据</span></div>
                    </el-col>
                    <!-- <el-col :span="8">
                        <div class="grid-content bg-purple">
                            <div style="float:left;width:140px;line-height: 25px;color:blue">确认人：{{remindobj.confirmusername}}</div>
                            <div style="float:left;line-height: 25px;color:blue">
                                <el-checkbox v-model="remindobj.chkremind" true-label="1" false-label="0" @change="chkremindChange">记住</el-checkbox>
                            </div>
                        </div>
                    </el-col> -->
                    <el-col :span="10">
                        <div class="grid-content bg-purple-light">
                            <el-button style="width:72px" @click.native="btnRefresh">刷新</el-button>
                            <el-button style="width:72px" @click.native="btnClose">退出</el-button>
                        </div>
                    </el-col>

                </el-row>

            </div>
        </template>
        <div style="height:100%">
            <vxe-table show-overflow ref="xTable" :data.sync="taskalertdata" height="auto" width="100%" border size="mini" :select-config="{ reserve: true }" show-header-overflow resizable header-align="center" :edit-config="{ trigger: 'click', mode: 'cell', showStatus: true, showIcon: false }" key="1" :row-class-name="rowclassname" class="mytable-style"  :loading="loading">
                <vxe-table-column type = "index" title = "No." width = "50" align = "center" ></vxe-table-column>
                <vxe-table-column field = "plan_execid" title = "待执行计划id" width = "100" align = "center" ></vxe-table-column>
                <vxe-table-column field = "his_code" title = "接口代号" width = "80" ></vxe-table-column>
                <vxe-table-column field = "plan_event" title = "任务事件类别" width = "100" ></vxe-table-column>
                <vxe-table-column field = "trans_id" title = "相关单据id" width = "100" ></vxe-table-column>
                <vxe-table-column field = "trans_id1" title = "相关单据id1" width = "70" align = "center" ></vxe-table-column>
                <vxe-table-column field = "trans_id2" title = "相关单据id2" width = "70" align = "center" ></vxe-table-column>
                <vxe-table-column field = "create_dt" title = "生成时间" width = "120" ></vxe-table-column>
                <vxe-table-column field = "create_user" title = "生成人" width = "120" ></vxe-table-column>
                <vxe-table-column field = "create_comment" title = "生成备注信息" width = "120" ></vxe-table-column>
                <vxe-table-column field = "exec_flag" title = "执行标志" width = "120" ></vxe-table-column>
                <vxe-table-column field = "exec_dt" title = "实际执行时间" width = "120" ></vxe-table-column>
                <vxe-table-column field = "exec_user" title = "实际执行人" width = "120" ></vxe-table-column>
                <vxe-table-column field = "exec_failcnt" title = "执行失败次数" width = "120" ></vxe-table-column>
                <vxe-table-column field = "exec_comment" title = "执行备注信息" width = "200" ></vxe-table-column>
                <vxe-table-column field = "create_host" title = "生成电脑" width = "120" ></vxe-table-column>
                <vxe-table-column field = "exec_msec" title = "任务执行耗时" width = "120" ></vxe-table-column>
            </vxe-table>
        </div>

    </rm-layout-top>

</template>

<script type="text/javascript">
export default {
    name: "rm_backtaskfailalertinfo",
    props: {
        tabledata: { type: Array },
        params: { type: Object },
    },
    data() {
        return {
            taskalertdata: this.tabledata,
            labobj: { formobj: {}, tableobj: [], plankey: 0 },
            loading: false,
        };
    },
    created() {},
    computed: {},
    watch: {},
    mounted() {},
    methods: {
        //获取自动提醒弹窗的选中行
        currentChangeEvent({ row, column }) {},

        //自动提醒弹窗列表的颜色
        rowclassname({ row, column }) {
            if (row.chkflag == "1") {
                return "row-pink";
            }
        },

        btnRefresh() {
            this.loading = true;
            this.$tool
                .request({
                    url: "ucent/alertmsg",
                    method: "post",
                    data: {
                        //action: "labInstrAlert",
                        params: this.params.paramlist,
                    },
                })
                .then((res) => {
                    this.taskalertdata = res.data;
                    this.loading = false;
                })
                .catch((e) => {
                    this.$alert(e, "提示");
                    this.loading = false;
                });
        },
        //退出
        btnClose() {
            this.$emit("change", "close");
        },

    },
};
</Script>

<style scoped>
.remind_class {
    color: rgb(236, 11, 11);
    font-size: 14px;
}
::v-deep .mytable-style .vxe-body--row.row-pink {
    background-color: pink;
    color: rgb(8, 8, 8);
}
</style>
